<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%
    
    	if (request.getAttribute("MostrarCliente") == null)
    	{
    		request.setAttribute("MostrarMensaje", "hidden");
    		request.setAttribute("MostrarCliente", "hidden");
    	}
    
	    if (request.getAttribute("ClienteId") == null)
	    {
	    	request.setAttribute("ClienteId", "");
	    }
    
    %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Sistema WEB</title>
</head>
<body>
<form action="ServletResumenCuenta" method="post">
	<table border="0" width="80%" height="100%" align="center">
		<tr><td colspan="2" bgcolor="#CCCCCC"><b>Resumen de Cuenta del Cliente</b></td></tr>
		<tr><td colspan="2"><hr size="1" noshade></td></tr>
		<tr><td colspan="2" align="center">Ingrese el Id del cliente:<input type="text" name="txtIdcliente" value="<%= request.getAttribute("ClienteId") %>"/>&nbsp;&nbsp;<input type="submit" value="Consultar"></td></tr>
		<!-- MENSAJE DE ERROR  -->
		<tr style="visibility:<%= request.getAttribute("MostrarMensaje") %>;"><td colspan="2">&nbsp;</td></tr>		
		<tr style="visibility:<%= request.getAttribute("MostrarMensaje") %>;"><td colspan="2" align="center"><font color="red"><b><%= request.getAttribute("MensajeError") %></b></font></td></tr>
		<!-- DATOS DEL CLIENTE  -->
		<tr style="visibility:<%= request.getAttribute("MostrarCliente") %>;"><td colspan="2"><hr size="1" noshade></td></tr>
		<tr style="visibility:<%= request.getAttribute("MostrarCliente") %>;"><td>Id:&nbsp;<b><%= request.getAttribute("ClienteId") %></b></td><td>Nombre:<b>&nbsp;<%= request.getAttribute("ClienteNombre") %></b></td></tr>
		<tr style="visibility:<%= request.getAttribute("MostrarCliente") %>;"><td>Condici&oacute;n de Venta:&nbsp;<b><%= request.getAttribute("ClienteCondVenta") %></b></td><td>Condici&oacute;n de IIBB:<b><%= request.getAttribute("ClienteCondIIBB") %></b></td></tr>
		<tr style="visibility:<%= request.getAttribute("MostrarCliente") %>;"><td>Tipo de Cliente:&nbsp;<b><%= request.getAttribute("ClienteTipo") %></b></td><td>e-Mail:&nbsp;<b><%= request.getAttribute("ClienteEmail") %></b></td></tr>
		<!-- CUENTA CORRIENTE -->
		<tr style="visibility:<%= request.getAttribute("MostrarCliente") %>;"><td colspan="2"><hr size="1" noshade></td></tr>
		<tr style="visibility:<%= request.getAttribute("MostrarCliente") %>;"><td>Cuenta Corriente:&nbsp;<b><%= request.getAttribute("ClienteNumeroCtaCte") %></b></td><td>Saldo Actual:&nbsp;$&nbsp;<b><%= request.getAttribute("ClienteSaldoActual") %></b></td></tr>
		<!-- RESUMEN DE CUENTA  -->
		<tr style="visibility:<%= request.getAttribute("MostrarCliente") %>;"><td colspan="2"><hr size="1" noshade></td></tr>
		<tr style="visibility:<%= request.getAttribute("MostrarCliente") %>;">
			<td colspan="2">
				<table border="1" width="100%" height="100%">
					<tr>
						<td width="50%" bgcolor="#CCCCCC" align="center">Compras&nbsp;(<%= request.getAttribute("ComprasCantidad") %>)</td>
						<td width="50%" bgcolor="#CCCCCC" align="center">Pagos&nbsp;(<%= request.getAttribute("PagosCantidad") %>)</td>
					</tr>
					<tr>
						<td>
							<table border="1" width="100%" height="100%">
								<tr><td align="center">Nro Factura</td><td align="center">Monto&nbsp;[$]</td><td align="center">Fecha</td></tr>
								<%= request.getAttribute("ComprasLista") %>
							</table> 
						</td>
					
						<td>
							<table border="1" width="100%" height="100%">
								<tr><td align="center">Nro Pago</td><td align="center">Monto&nbsp;[$]</td><td align="center">Fecha</td></tr>
								<%= request.getAttribute("PagosLista") %>
							</table> 
						</td>
					</tr>
					<tr align="center" width="100%">
					<td width="50%" bgcolor="#CCCCCC" align="center">Pendientes&nbsp;(<%= request.getAttribute("PendientesCantidad") %>)</td>
					</tr>
					<tr>
					<td>
						<table border="1" width="100%" height="100%">
							<tr><td align="center">Rodamiento</td><td align="center">Cantidad&nbsp;</td></tr>
								<%= request.getAttribute("PendientesLista") %>
						</table> 
					</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</form>
</body>
</html>